import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const Home = () => import('../views/Home.vue')
const  PageOne = () => import('../views/PageOne.vue')
const PageTwo = () => import('../views/PageTwo.vue')
const PageThree = () => import('../views/PageThree.vue')
const PageFour = () => import('../views/PageFour.vue')


const routes = [

    {
        path: '/',
        name: 'home',
        component: Home,
        redirect: '/pageOne',
        children:[
            {
                path: '/pageOne',
                name: 'pageOne',
                component: PageOne
            },
            {
                path: '/pageTwo',
                name: 'pageTwo',
                component: PageTwo
            }


        ]
    },
    {
        path: '/home2',
        name: 'home2',
        component: Home,
        children: [
            {
                path: '/pageThree',
                name: 'pageThree',
                component: PageThree
            },
            {
                path: '/pageFour',
                name: 'pageFour',
                component: PageFour
            }
        ]
    }


]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
